Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unwanted import refinement #1801

Merged
merged 1 commit into from
May 5, 2021

Conversation

rayshih
Copy link
Contributor

@rayshih rayshih commented May 5, 2021

The problem

If module F imports and exports G, but it also has it's own bindings defined like this:

module F (module F, module G) where

import G

f1 :: String
f1 = "f1"

And the usage of F is

import F (f1, g1)

before this pr it will suggest refinement like

import G (g1)

This is definitely wrong.

The correct one should be not suggesting refinement in this case, since f1 is definitely needed, so does module F

See the attached test change for full example

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix

@jneira jneira merged commit 1e47c75 into haskell:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants